
<div class="col-sm-3 col-lg-3">
	<script type="text/javascript">
			function book_info() {
					document.location = "{{ request.protocol + "://" + request.host + "/book/" + book["name"] }}";
				}
	</script>

	<div class="dash-unit">
		<dtitle>{{ book["tag"] }} </dtitle>
		<hr>
		<div class="thumbnail">
			<img onclick="book_info();" src="{{ static_url(book["img"]) }}" alt="Marcel Newman">

		</div><!-- /thumbnail -->

		<h1>{{ book["name"].split(".")[0] }}</h1>
		<h3>{{ book["author"] }}</h3>


        <div class="cont">
             <a href="#myModal1" role="button" class="btnnew" data-toggle="modal" onclick="upload_check();">
				 上传图书
			 </a>
        </div>
    </div>
		  <!-- Modal -->
			  <div class="modal fade" id="myModal1" tabindex="-1" role="dialog" aria-labelledby="myModalLabel"
				   aria-hidden="true">
			    <div class="modal-dialog">
			      <div class="modal-content">
			        <div class="modal-header">
			          <h4 class="modal-title"> {{ book["name"].split(".")[0] }} </h4>
			        </div>
					  <div class="modal-body">
			          ...
			         </div>

			        <div class="modal-footer">
                        <form enctype="multipart/form-data" method="post" action="/upload/book/{{ book["name"] }}">
                            {% module xsrf_form_html() %}
                            <input type="file" name = "book_file" id="upload" onchange="validate_book_upload(this);"/>
							<input type="hidden" name = "uri" value="{{ request.uri }}">
						   <button class="btn btn-default" type="submit"> 上传 </button>

						</form>
			       　</div>

			      </div><!-- /.modal-content -->
			    </div><!-- /.modal-dialog -->
			  </div><!-- /.modal -->

</div>


